cmake_minimum_required(VERSION 2.6)
PROJECT(Probe)
FIND_PACKAGE(Qt4 REQUIRED)

# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
find_package(SFML 1.6 REQUIRED system window graphics network audio)
SET(SFML_LIBRARIES sfml-graphics sfml-window sfml-system GLU X11)
set(EIGEN_INCLUDE_DIR /usr/include/eigen3 /usr/include/eigen3/unsupported)
include_directories(${EIGEN_INCLUDE_DIR})

if(SFML_FOUND)
  include_directories(${SFML_INCLUDE_DIR})
endif()

SET(Probe_SOURCES ./src/main.cpp 
./src/QSFMLCanvas.cpp 
./src/ResourceManagement/ResourceManager.cpp 
./src/ResourceManagement/Resource.cpp 
./src/ResourceManagement/ImageResource.cpp 
./src/MathUtils.cpp
./src/Game/GameWindow.cpp
./src/Game/GameComponent.cpp
./src/Game/GameComponentManager.cpp
./src/Game/SpriteComponent.cpp
./src/Game/Camera.cpp
)

SET(Probe_HEADERS ./src/QSFMLCanvas.h 
./src/ResourceManagement/ResourceManager.h 
./src/ResourceManagement/Resource.h 
./src/ResourceManagement/ImageResource.h 
./src/MathUtils.h
./src/Game/GameWindow.h
./src/Game/GameComponent.h
./src/Game/GameComponentManager.h
./src/Game/GameComponentDefs.h
./src/Game/SpriteComponent.h
./src/Game/Camera.h
)

QT4_WRAP_CPP(Probe_HEADERS_MOC ${Probe_HEADERS})

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

ADD_EXECUTABLE(Probe ${Probe_SOURCES} ${Probe_HEADERS_MOC})
TARGET_LINK_LIBRARIES(Probe ${QT_LIBRARIES} ${SFML_LIBRARIES})
target_link_libraries(Probe ${SFML_LIBRARIES})
